package org.exodia.seeds.ppv {
	import flash.events.Event;
	import org.exodia.seeds.model.Agent;
	import org.papervision3d.core.proto.LightObject3D;
	import org.papervision3d.core.proto.MaterialObject3D;
	import org.papervision3d.lights.PointLight3D;
	import org.papervision3d.materials.BitmapColorMaterial;
	import org.papervision3d.materials.BitmapMaterial;
	import org.papervision3d.materials.ColorMaterial;
	import org.papervision3d.materials.shadematerials.GouraudMaterial;
	import org.papervision3d.materials.shaders.GouraudShader;
	import org.papervision3d.materials.shaders.IShader;
	import org.papervision3d.materials.shaders.PhongShader;
	import org.papervision3d.materials.shaders.ShadedMaterial;
	import org.papervision3d.materials.shaders.Shader;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.PaperPlane;
	import org.papervision3d.objects.primitives.Sphere;
	/**
	* ...
	* @author Default
	*/
	public class AgentPPV extends DisplayObject3D {
		private var _agent:Agent;
		
		public function AgentPPV( agent:Agent ) {
			_agent = agent;
			
			var light:PointLight3D = new PointLight3D();
			light.moveUp( 100 );
			light.moveRight( 300 );
			var mat:GouraudMaterial = new GouraudMaterial( light, 0xFFFFFF, 0x0FBD43 );
			//this.addChild( new PaperPlane( shaded, 2 ));
			this.addChild( new Sphere( mat, agent.radius ));
			//this.roll(30);
		}
		
		public function get agent() :Agent {
			return _agent;
		}
/**
		override public function get x():Number {
			//trace( agent.position );
			return agent.position.x;
		}

		override public function get y():Number{
			return agent.position.y;
		}

		override public function get z():Number{
			return agent.position.z;
		}
*/
	}
	
}